mod lexer;
mod token;

use lexer::Lexer;

use std::io::Read;

fn main() {
    let path = std::env::args().nth(1).expect("no path given");
    let mut file = std::fs::File::open(path).unwrap();
    let mut contents = String::new();
    file.read_to_string(&mut contents).unwrap();
    println!("{contents:?}");

    let mut lexer = Lexer::new(&contents);
    let tokens = lexer.tokenizer();
    for token in tokens {
        println!("{token:?}");
    }
}
